<?php
Router::parseExtensions();

Router::connect('/', array('controller' => 'posts', 'action' => 'index'));
Router::connect('/cp', array('controller' => 'dashboards', 'admin' => true));
Router::connect('/admin/settings', array('controller' => 'dashboards','action'=>'settings', 'admin' => true));

 

Router::connect('/login/*', array('controller' => 'users', 'action' => 'login'));
Router::connect('/logout/*', array('controller' => 'users', 'action' => 'logout'));

Router::connect('/registration/*', array('controller' => 'users', 'action' => 'register'));
Router::connect('/profile/*', array('controller' => 'users', 'action' => 'profile'));

    
    
Router::connect('/doctors/*',
    array('controller'=>'posts', 'action'=>'search',1)
    
);
Router::connect('/hospitals/*',
    array('controller'=>'posts', 'action'=>'search',2)
    
);
Router::connect('/ambulance-services/*',
    array('controller'=>'posts', 'action'=>'search',3)
    
);
Router::connect('/blood-banks/*',
    array('controller'=>'posts', 'action'=>'search',4)
    
);
Router::connect('/diagnostic-centers/*',
    array('controller'=>'posts', 'action'=>'search',5)
    
);
Router::connect('/equipments/*',
    array('controller'=>'posts', 'action'=>'search',6)
    
);
Router::connect('/medicine-stores/*',
    array('controller'=>'posts', 'action'=>'search',7)
    
);
    
Router::connect(
        '/search/*',  
        array( 
            'controller' => 'posts',
            'action'=>'search'
        )
        
    );

Router::connect(
        '/details/:id',  
        array( 
            'controller' => 'posts',
            'action'=>'details'
        )
        ,  
        array(
            'pass' => array(
                'id'
            )
        )  
        
        
    );
    
    
Router::connect('/ajax/:controller/:action/*', array('prefix' => 'ajax', 'ajax' => true));

//Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display'));


Router::parseExtensions('html', 'rss');

Router::connect(
    '/:title',
    array('controller' => 'pages', 'action' => 'display'),
    array(
        'pass' => array('title')
    )
);


